Prusy, Rewolucja Francuska I Rozbiory Polski